package com.itheima.health.dao;


import com.itheima.health.dto.OrderSubmitParam;
import com.itheima.health.pojo.Member;
import com.itheima.health.pojo.Order;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.Date;

@Mapper
public interface OrderPersonDao {



    void insert(OrderSubmitParam orderSubmitParam);



    @Select("select  *  from t_order_person  where id_card=#{idCard} and  order_date=#{orderDate}")
    OrderSubmitParam getOrderByIdCardAndOrderDate(String idCard, Date orderDate);

    @Insert("insert into   t_huiyuan(name, sex, id_card, phone_number, reg_time)" +
            "values (#{name},#{sex},#{idCard},#{phoneNumber},#{regTime})")
    void insertHY(Member member);

    @Select("select * from t_order_person where id =#{id}")
   OrderSubmitParam findById(Integer id);
}
